<%@ include file="template/CommonHeader.jsp" %>
<link href="/FMTOOL_WEB/resources/plugins/tables/dataTables/jquery.dataTables.css" type="text/css" rel="stylesheet" />

    <div id="wrapper">
        <%@ include file="template/LeftNavigator.jsp" %>


        <!--Body content-->
        <div id="content" class="clearfix">
            <div class="contentwrapper"><!--Content wrapper-->

                <%@ include file="template/PageHeader.jsp" %>

                <!-- Build page from here: -->
                <%@ include file="template/CommonSuccessMessage.jsp" %>
                <%@ include file="template/CommonErrorMessage.jsp" %>
                
                <div class="row-fluid">
                      
                       
                        <div class="span12">

                            <div class="box gradient">

                                <div class="title">
                                    <h4>
                                        <span>Market List</span>
										<button class="btn btn-primary btn-mini nonMobile" href="#" onClick="window.location='newMarketForm.action'" style="float:right;margin-right:40px;">New Market</button>
                                    </h4>
									
                                </div>
                                <div class="content noPad clearfix">
                                    <table cellpadding="0" cellspacing="0" border="0" class="responsive dynamicTable display table table-bordered" width="100%">
                                        <thead>
                                            <tr>
                                                <th style="text-align: center;" align="center">Serial</th>
                                                <th>Market Name</th>
												<th class="nonMobile">Actions</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        <s:iterator value="marketList" id="marketLst" status="indx">
						                	
						                	<tr>
							                    <td style="text-align: center;"><s:property value="#indx.count"/></td>
							                    <td style="text-align: left;"><s:property value="marketName"  /></td>
							                    <td  class="nonMobile">
							                      <div class="controls center">
														<a href="#editWindow<s:property value="#indx.count"/>" title="Edit Market" class="tip" data-toggle="modal"><span class="icon12 icomoon-icon-pencil"></span></a>
														<a href="#delConfirmation<s:property value="#indx.count"/>" title="Remove Market" onClick="" class="tip" data-toggle="modal"><span class="icon12 icomoon-icon-remove"></span></a>
												  </div>	
												 
												 <!-- Edit Confirmation Modal -->
												 <form style="margin: 0;display: inline;" action="editMarket.action" id="editForm<s:property value="#indx.count"/>">
												 <div id="editWindow<s:property value="#indx.count"/>" class="modal hide fade" style="display: none; ">
												     <div class="modal-header" style="text-align: left;padding-left: 10px;">
												       <button type="button" class="close" data-dismiss="modal"><span class="icon12 minia-icon-close"></span></button>
												       <h3>Market Edit Window</h3>
												     </div>
												     <div class="modal-body">
												             
												           <div class="form-row row-fluid">
					                                            <div class="span12">
					                                                <div class="row-fluid">
					                                                    <label class="form-label span3" for="market.marketName">Market Name<font style="color:red">*</font></label>
					                                                    <input class="span9" type="text" value="<s:property value='marketName' />" name="market.marketName" id="marketName"  readonly="readonly" />						
					                                               </div>
                                            			        </div>
                                        			        </div>										
												             <input type="hidden" name="market.marketId" value="<s:property value='marketId' />" />                              
												     </div>
												     <div class="modal-footer">
												       <a href="#" class="btn" data-dismiss="modal">No</a>
												       <a href="#" class="btn btn-primary" onclick="editMarket(<s:property value='#indx.count'/>)">Yes</a>
												     </div>
												</div>
											</form>
												<!-- Edit Confirmation Modal -->
												 
												 <!-- Delete Confirmation Modal -->
												 <div id="delConfirmation<s:property value="#indx.count"/>" class="modal hide fade" style="display: none; ">
												     <div class="modal-header">
												       <button type="button" class="close" data-dismiss="modal"><span class="icon12 minia-icon-close"></span></button>
												       <h3>Delete Confirmation</h3>
												     </div>
												     <div class="modal-body">
												         <div class="paddingT15 paddingB15">    
												           <h4>Are you sure you want to delete ?</h4>
												           <p><b>Market Name :</b> <s:property value="marketName"  /></p>
												         </div>                                    
												     </div>
												     <div class="modal-footer">
												       <a href="#" class="btn" data-dismiss="modal">No</a>
												       <a href="deleteMarket.action?market.marketId=<s:property value="marketId"/>&market.marketName=<s:property value="marketName"/>" class="btn btn-primary">Yes</a>
												     </div>
												</div>
												<!-- Delete Confirmation Modal -->
												 
							                    </td>
							                </tr>
							            </s:iterator>
										
				
                                        </tbody>
                                        
                                    </table>
                                  
                                </div>

                            </div><!-- End .box -->

                        </div><!-- End .span12 -->

                    </div><!-- End .row-fluid -->

                <!-- End page Content: -->
                
            </div>
            <!-- End contentwrapper -->
        </div><!-- End #content -->


    </div><!-- End #wrapper -->
    
 
  

<%@ include file="template/CommonJS.jsp" %>    

 <script type="text/javascript" src="/FMTOOL_WEB/resources/plugins/tables/dataTables/jquery.dataTables.min.js"></script>
 <script type="text/javascript" src="/FMTOOL_WEB/resources/plugins/tables/responsive-tables/responsive-tables.js"></script><!-- Make tables responsive -->
 <script type="text/javascript" src="/FMTOOL_WEB/resources/js/datatable.js"></script><!-- Init plugins only for page -->
 <script type="text/javascript">
  function editMarket(formSerial)
  {
   document.getElementById("editForm"+formSerial).submit();
  }
 </script>
    
		 
<%@ include file="template/CommonFooter.jsp" %>    

